package org.thanos.demo.message;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

@Component
public class DemoMessageListener implements MessageListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(DemoMessageListener.class);

    @Override
    public void onMessage(Message message, byte[] bytes) {
        LOGGER.info("redis message is {}.", message.toString());
    }
}
